home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
NetNews Offline 2
/
NetNews Offline Volume 2.iso
/
news
/
comp
/
std
/
c
/
487
< prev
next >
Wrap
Internet Message Format
|
1996-08-06
|
1KB
Path: io.com!not-for-mail
From: jamshid@io.com (Jamshid Afshar)
Newsgroups: comp.std.c
Subject: Multibyte and wide-character support
Date: 4 Mar 1996 02:26:56 -0600
Organization: Illuminati Online, Austin, Texas, USA
Message-ID: <4he9gg$m9l@pentagon.io.com>
NNTP-Posting-Host: pentagon.io.com
Is there an easy way to test if a multibyte string contains only
singlebyte characters and thus can be passed to a function expecting a
"regular" char*? Is "if (strlen(mbs)==mblen(mbs))" a valid test and
is there anything better?
Why aren't there wchar_t versions of functions like atoi() strtod()?
Do they just have to be converted to multibyte strings, and do atoi(),
etc. work with multibyte strings?
Btw, VC++4's docs say that if mbstowcs()'s wchar_t* destination
argument is NULL then the function doesn't do a conversion of the
multibyte string; it just returns the size needed to store the
multibyte string. Accepting a NULL first argument is not required by
Standard C, is it? Also, the VC++4 docs seem to indicate fputws(), a
wchar_t version of fputs(), is "ANSI" compatible. Standard C doesn't
actually specify any wide-character i/o functions, does it?
Thanks,
Jamshid Afshar
jamshid@io.com